package 软件工程实验四;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

public class abc {
    public static void main(String[] args) {
        String file = "D:/123.txt";

        try (BufferedReader a = new BufferedReader(new FileReader(file))) {
            StringBuilder b = new StringBuilder();
            int n;

            while ((n = a.read()) !=-1) {
                b.append((char) n);
            }
            String i = b.toString();
            String m = extra(i);
            System.out.println(m);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    private static String extra(String o) {
        StringBuilder b = new StringBuilder();

        for (int i = 0; i < o.length(); i++) {
            char currentChar = o.charAt(i);


            b.append(currentChar);
        }

        return b.toString();
    }
}
